home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 September
/
1984-09.d64
/
mystery manor_64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
9KB
|
250 lines
3 rem murder at mystery manor
9 poke53280,1:poke53281,0:s=54272:forj=0to24:pokes+j,0:next:pokes+24,15
12 print"[147]"tab(7)"[155][223][169]"
13 printtab(7)" [223][169] ":printtab(7)" [223][169] [146] ystery"
15 printtab(7)" [194] [194] ":printtab(7)" [194] [194] ":print"[145][145][145]"tab(21)chr$(142);
24 gosub1713:print"at"
27 print""tab(12)"[152][223][169]":printtab(12)" [223][169] "
28 printtab(12)" [223][169] [146] arple"
30 printtab(12)" [194] [194] ":printtab(12)" [194] [194] "
33 print"[145]"tab(17)"[151][223][169]":printtab(17)" [223][169] ":printtab(17)" [223][169] [146] anor"
36 printtab(17)" [194] [194] ":printtab(17)" [194] [194] "
39 gosub1713
42 forj=1to1000:next
45 pokes+5,15:pokes+6,0:pokes+4,129
50 j=1:fori=1to15:poke53281,j:poke53280,1-j
51 pokes+1,int(rnd(1)*60)+5
53 j=1-j:forp=1to30:next:next
56 pokes+4,0
100 deffnr(x)=int(rnd(1)*x)+1:j=rnd(-ti)
103 dimp%(50),s$(22),r$(14),c$(6),v$(3),v(3),d%(10,2)
112 forj=1to10:p%(j)=fnr(11)+3:next
115 forj=11to22:p%(j)=fnr(13)+1:next
118 forj=24to31:p%(j)=4:next
121 p%(23)=fnr(8)+6
124 j=fnr(10):p%(35)=j:p%(34)=p%(j):p%(j)=0
127 j=fnr(10):ifp%(j)=0then127
130 p%(32)=j:p%(j)=0:j=fnr(12):p%(33)=j:p%(j+10)=0
133 forj=1to22:ifrnd(1)<=.75thenp%(j)=-p%(j)
136 reads$(j):next
139 forj=1to14:readr$(j):next
142 forj=0to10:readd%(j,1),d%(j,2):ifrnd(1)<.9thend%(j,0)=-1
143 next
145 forj=0to3:readv$(j):next
148 p=2049:i=0:forj=4000to7000step1000
151 ifj=peek(p+2)+peek(p+3)*256thenda(i)=p:i=i+1:goto157
154 p=peek(p)+peek(p+1)*256:goto151
157 next
172 print"[144] how many players (1-6) ?"
175 geta$:ifa$<"1"ora$>"6"then175
178 i=val(a$):p%(49)=i
181 forj=1toi:p%(35+j)=1:next
190 print"[147][151][193]ll players except [208]layer #1 must leave"chr$(14)
192 print"the room at this point.":print" [208]layer # 1: [208]ress [210][197][212][213][210][206] [146]"
193 print" to begin the game!"
194 geta$:ifa$<>chr$(13)then194
196 poke53280,12:poke53281,15:q=1
200 print"[147][144][208][204][193][217][197][210] #"q"---------------[151]"
203 ifc$(q)<>""then212
206 print"[208]ress any two keys to establish your"
207 print"[211]ecret [195]ode. [215]ith this code, no other"
209 print"player can steal your turn!":print"[197]nter your code now!"
210 gosub1700:c$(q)=a$:goto218
212 print"[197]nter your [211]ecret [195]ode!":gosub1700
215 ifc$(q)<>a$theni=0:gosub1710:goto200
218 print"[147][144][208][204][193][217][197][210] #"q"---------------[151]"
221 r=p%(35+q):print"[217]ou are in the "r$(r)"."
224 print"[196]o you wish to leave this room [[217]/[206]] ?"
227 geta$:ifa$="n"thenprint"[206]o":goto330
230 ifa$<>"y"then227
233 i=1:j=r:gosub1730:forj=0to3:readv(j):next
236 print"[217]es":print"[196]oors from this room are found to the:"
239 forj=0to3:ifv(j)<>0thenprinttab(4);v$(j)
242 next:print"[212]ype [144] [206] [146] , [211] [146] , [197] [146] ,[151]or [144] [215] [146][151] to move!":i=3
245 geta$:ifa$=""then245
248 a=asc(a$)or128:i=0:ifa<197ora>215then245
251 ifa=asc(v$(i))then260
254 i=i+1:ifi<4then251
257 goto245
260 print"[199]o "v$(i)
261 if v(i)<1thenprint"[206]o door this way. [217]ou can't move.":goto1910
263 ifv(i)<100thenr=v(i):print"[205]oving to new room.":fori=1to1000:next:goto330
266 z=v(i)-100:ifd%(z,0)=0then300
269 print"[212]hat door is locked":gosub1760
270 ifa=0thenprint"[217]ou don't have a matching key.":print"[206]o move.":goto1910
272 print"[217]our key opens the door.":gosub1770:print"[205]oving to new room."
300 i=d%(z,1):ifi=rtheni=d%(z,2)
303 r=i:gosub1760:ifa<>1then330
306 print"[196]o you want to lock this door behind you [[217] / [206]] ?"
309 geta$:ifa$="n"thenprint"[206]o":goto330
312 ifa$<>"y"then309
315 print"[217]es":gosub1770:print"[196]oor locked."
330 p%(q+35)=r:print"[147][217]ou are in the "r$(r)"."
333 print"[217]ou carry ";:i=p%(q+41):gosub1780:print"."
336 j=0:print"[217]ou see the following here:"
339 fori=1to31:ifp%(i)=rthenj=j+1:print" ";:gosub1780:print"."
342 next:fori=1to6:ifi<>qandp%(35+i)=rthenprint" [208]layer #"i".":j=j+1
345 next:ifp%(34)=rthenprint" the body of the "s$(p%(35))".":j=j+1
348 ifj=0thenprint"[206]othing of interest."
351 print"[208]ress [144] [210][197][212][213][210][206][160][146][151] for options...."
354 geta$:ifa$<>chr$(13)then354
375 print"[147]"
376 print"[144] >>>>> [212][213][210][206][160][207][208][212][201][207][206][211] <<<<<":print" [151][193][146] [193]ccuse the [205]urderer!"
377 print"[160][196][146] [196]rop an item.":print" [200][146] [200]ide an item or suspect."
379 print" [206][146] [206]o action.":print" [208][146] [208]ilfer from another player."
381 print" [211][146] [211]earch the room for hidden items.":print" [212][146] [212]ake an item."
384 print"[197]nter letter for action desired!"
387 geta$:ifa$<"a"ora$>"t"then387
390 print"[147]":a=asc(a$):ona-64goto700,387,387,800
393 ifa$="h"then970
396 ifa$<"n"then387
400 ona-77goto450,387,880,398,387,930,820
450 print"[208]ress [144] [210][197][212][213][210][206] [146][151] to end your turn!"
453 geta$:ifa$<>chr$(13)then453
456 i=0:print"[144][147][208][204][193][217][197][210] #"q"=========== [197]nd [212]urn":gosub1710
459 q=q+1:ifq>p%(49)thenq=1
462 ifp%(q+35)=0then459
465 goto200
700 print"[147][144] ***** [205][193][203][197] [193][206] [193][195][195][213][211][193][212][201][207][206] *****[151]":i=1
703 forj=1to10:printj"[157]:"tab(5)"[212]he ";s$(j)".":next
706 print"[197]nter number of [205]urder [214]ictim ";:inputj
709 ifj<>p%(35)theni=0
712 gosub1900
715 forj=1to10:printj"[157]:"tab(5)"[212]he ";s$(j)".":next
718 print"[197]nter number of [205]urderer ";:inputj
721 ifj<>p%(32)theni=0
724 gosub1900
727 forj=1to12:printj"[157]:"tab(5)"[212]he "s$(j+10)".":next
730 print"[197]nter number of [205]urder [215]eapon ";:inputj
733 ifj<>p%(33)theni=0
736 gosub1900
739 forj=1to14:printj"[157]:"tab(5)"[212]he "r$(j)".":next
742 print"[197]nter number of [205]urder [210]oom ";:inputj
745 ifj<>abs(p%(34))theni=0
746 print"[147][211]ummoning the [208]olice to make an":print"arrest......"
748 pokes+14,5:pokes+18,16:pokes+3,1:pokes+24,143:pokes+6,240:pokes+4,65:a=5389
751 forj=1to200:r=a+peek(s+27)*3.5:pokes,rand255:pokes+1,int(r/256):next
754 forj=0to24:pokes+j,0:next:pokes+24,15
757 forj=1to2500:next
760 ifi=0then772
763 i=3:print"[217]our solution is correct!":gosub1710
769 print"[208]layer #"q"has cracked the case!":goto787
772 i=2:print"[206]o!...[212]hat was a false arrest!":gosub1710
775 gosub1800:p%(35+q)=0:p%(50)=p%(50)+1:print"[217]ou're out of the game!"
778 ifp%(50)<p%(49)then450
781 restore:gosub1713:forj=1to500:next:gosub1713
784 print"[193]ll players have given incorrect":print"solutions to the crime!!"
785 print"[206]obody wins !"
787 print"[200]ere is the correct solution:":print"[212]he "s$(p%(32))
789 print"killed the "s$(p%(35)):print"in the "r$(abs(p%(34)))","
791 print"using the "s$(p%(33)+10)".":end
800 print"[144] *** [196][210][207][208] [193][206] [201][212][197][205] ***[151]":gosub1800
803 ifi=0thenprint"[217]ou weren't carrying anything !":goto450
806 print"[217]ou drop ";:gosub1780:print".":goto450
820 print"[144] *** [212][193][203][197] [193][206] [201][212][197][205] ***[151]":j=1:print"[212]hese items are available:"
823 fori=11to31:ifp%(i)<>rthen829
826 printj": ";:gosub1780:print".":poke900+j,i:j=j+1
829 next:ifj=1thenprint"[206]o items.":goto450
832 print"[197]nter number to take an item, or":print"enter zero to take nothing."
835 input"[215]hat item do you want";a:ifa<0ora>=jthen835
838 ifa=0thenprint"[206]o item taken.":goto450
841 gosub1800:ifi<>0thenprint"[217]ou drop ";:gosub1780:print"."
844 i=peek(900+a):p%(i)=100+q:p%(q+41)=i
845 print"[217]ou take ";:gosub1780:print".":goto450
880 print"[144] *** [208][201][204][198][197][210] [198][210][207][205] [193][206][207][212][200][197][210] ***[151]":j=0
881 print"[212]hese players are also in the room..."
883 fori=1to6:ifp%(35+i)=randi<>qthenprint" [208]layer #"i".":j=j+1
886 next:ifj=0thenprint"[206]o other players are in the room!":goto450
889 print"[215]hich player will you steal fro